#include <stdio.h>

#define SIZE 3

int main()
{
        float a[SIZE][SIZE];
        for (int i = 0; i < SIZE; i++) {
                for (int j = 0; j < SIZE; j++) {
                        scanf("%f", &a[i][j]);
                }
        }
        float tmp1 = a[0][0]*a[1][1]*a[2][2] + a[1][0]*a[2][1]*a[0][2] + a[0][1]*a[1][2]*a[2][0];
        // printf("tmp1: %f\n", tmp1);
        float tmp2 = a[0][2]*a[1][1]*a[2][0] + a[0][1]*a[1][0]*a[2][2] + a[0][0]*a[2][1]*a[1][2];
        // printf("tmp2: %f\n", tmp2);
        printf("%.2f", tmp1-tmp2);
        return 0;
}
